package com.gufe.controller.user.mp;

import com.gufe.result.Result;
import com.gufe.dto.NoticeDTO;
import com.gufe.service.user.mp.WxNoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Slf4j
@RestController
@RequestMapping("/api/index")
public class WxNoticeController {

    @Autowired
    private WxNoticeService wxNoticeService;

    @GetMapping("/Notice")
    public Result<List<NoticeDTO>> getNoticeList() {
        List<NoticeDTO> noticeList = wxNoticeService.getNoticeList();
        return Result.success(noticeList);
    }
}